import {post, get} from './http'
import {initDate} from './date.js'
import {hasPermission} from '@/common/function/permission'
import utils from "@/common/util/utils";
import reg from "@/common/util/reg";
import index from "@/common/api";
import lsbridge from "lsbridge"

import DataSelect from "@/components/select/DataSelect";

const components = [DataSelect]


export default (vue) => {
    window._ = {toString: utils.toString}
    window.lsbridge = lsbridge
    initDate()
    vue.prototype.$post = post
    vue.prototype.$get = get
    vue.prototype.$permission = hasPermission
    vue.prototype.$api = index
    vue.prototype.$utils = utils
    vue.prototype.$reg = reg

    components.forEach(a => vue.component(a.name, a))
}
export vuse from './vuse'